package com.cn.service;

import java.util.List;

import com.cn.dao.CustomerDao;
import com.cn.domain.Customer;


public class CustomerService {

	private CustomerDao customerDao;
    public void setCustomerDao(CustomerDao customerDao) {
		this.customerDao = customerDao;
	}
	public Customer getLoginUsername(String loginusername) {
	
		return customerDao.getLoginUsername(loginusername);
	}
	public void addCustomer(Customer customer) {
		
		 customerDao.addCustomer(customer);
		
	}
	public Customer getLoginCustomer(String loginUsername, String password) {
		
		return customerDao.getLoginCustomer(loginUsername,password);
	}
	public void updatemessage(Customer customer) {
		// TODO Auto-generated method stub
		customerDao.updatemessage(customer);
	}
	public Customer getLoginAdmin(String loginUsername, String password) {
		// TODO Auto-generated method stub
		return customerDao.getLoginAdmin(loginUsername, password);
	}
	public  List<Customer> findAllCustomer() {
		
		return customerDao.findAllCustomer();
		
	}
	public void deleteCustomer(int cid) {
		// TODO Auto-generated method stub
		customerDao.deleteCustomer(cid);
	}
	public Customer getExitLoginUsername(String loginUsername) {
		// TODO Auto-generated method stub
		return customerDao.getExitLoginUsername(loginUsername);
	}


    

}
